/*
 * $Id: $
 */
package org.rcgwt.client.ui.grid.internal;

import org.rcgwt.client.ui.grid.internal.model.IGridModel;
import org.rcgwt.client.ui.grid.internal.model.IGroupModel;
import org.rcgwt.client.ui.grid.internal.model.IRowModel;

/**
 * 
 * @author Olivier Oeuillot (latest modification by $Author: $)
 * @version $Revision: $ $Date: $
 */
public class RowRenderedIndexRecorder implements
		IRenderedIndexRecorder<IRowModel, IGroupModel> {

	private final IGridModel gridModel;

	public RowRenderedIndexRecorder(IGridModel gridModel) {
		this.gridModel = gridModel;
	}

	@Override
	public void clearRenderedIndexes(IGroupModel group) {
		// TODO Auto-generated method stub

	}

	@Override
	public int getRenderedIndex(IRowModel row) {
		return row.getModelIndex();
	}

	@Override
	public void initializeRenderedIndexes() {
		// TODO Auto-generated method stub

	}

	@Override
	public IRowModel getElementModelByRenderedIndex(int renderedIndex) {
		return gridModel.searchRowModel(renderedIndex);
	}

}
